namespace Cos.Core.NHibernate.Mapping
{
    using FluentNHibernate.Mapping;

    public class PermissionMap : ClassMap<PermissionDataModel>
    {
        public PermissionMap()
        {
            this.Table("Permission");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("PermissionID");
            this.Map(x => x.PermissionName).Not.Nullable().Column("PermissionName");
            this.Map(x => x.ParentID).Column("ParentID");
            //this.HasMany(x => x.Acls).Not.KeyNullable().KeyColumn("PermissionID");
        }
    }
}